From: Erik Moeller Date: Mon, 22 Mar 2004 03:56:45 +0000 (+0000) Subject: enable rightclick section editing for diffs to current page X-Git-Tag: 1.3.0beta1~754 X-Git-Url: http://git.cyclocoop.org/wiki/%27.%24skin%5B%27img%27%5D.%27?a=commitdiff_plain;h=0933f219219bfea325689f330d2aab26da88c5ab;p=lhc%2Fweb%2Fwiklou.git enable rightclick section editing for diffs to current page --- diff --git a/includes/Skin.php b/includes/Skin.php index c87fdbe3cc..9d0b8154e1 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -2218,7 +2218,7 @@ class Skin { $link = "$tocline
"; if($level) { return "$link\n"; - } else { + } else { return "
$link
\n"; } @@ -2239,7 +2239,7 @@ class Skin { # These two do not check for permissions: check $wgTitle->userCanEdit before calling them function editSectionScript( $section, $head ) { global $wgTitle, $wgRequest; - if( $wgRequest->getInt( "oldid" ) ) { + if( $wgRequest->getInt( "oldid" ) && ( $wgRequest->getVal( "diff" ) != "0" ) ) { return $head; } $url = $wgTitle->escapeLocalURL( "action=edit§ion=$section" ); @@ -2249,17 +2249,17 @@ class Skin { function editSectionLink( $section ) { global $wgRequest; global $wgTitle, $wgUser, $wgLang; - + if( $wgRequest->getInt( "oldid" ) && ( $wgRequest->getVal( "diff" ) != "0" ) ) { # Section edit links would be out of sync on an old page. # But, if we're diffing to the current page, they'll be # correct. return ""; } - + $editurl = "§ion={$section}"; $url = $this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg("editsection"),"action=edit".$editurl); - + if( $wgLang->isRTL() ) { $farside = "left"; $nearside = "right";